<div class="flex flex-col h-full">
  @if($data)
   <div
    class="flex-grow h-10 app-scrollbar overflow-y-auto overflow-x-hidden"
   >
     <a-spin class="block flex flex-col h-full" loading={{$loading}} tip="加载节点中...">
       <a-tree
        class="app-tree"
          :data="{{$data}}"
          showLine=true
          blockNode=true
          draggable={{$draggable}}
          onDrop={{$handleDrop}}
          selectedKeys={{$value}}
          onSelect={{$onSelect}}
          expandedKeys={{$expandedKeys}}
          onExpand={{$onExpand}}
          fieldNames={{$fieldNames}}
       >
         @if(count($contextMenus))
         @else
           <div class="flex-grow whitespace-nowrap py-2 flex gap-2 items-center">
             <span class="inline-flex rounded-full border-2 w-4 h-4 {{$bgColor}} {{$borderColor}}"></span>
             {{$slots?$slots['label'][$item]:$item[$fieldNames['title']]}}
           </div>
         @endif
      </a-tree>
    </a-spin>
  </div>
  @else
    <a-empty/>
  @endif
</div>



